﻿var c = new Object({ url: "AjaxPages/AjaxChatRequest.ashx", async: false, dataType: "json", type: "POST", a: <%=Application["maxCount"].ToString()%>, b: "Guest", e: "<%=Request.UserHostAddress%>" }); ChatMsgObj = function() { }; $(document).f(function() { f(); $("#txtMsgName").select() }); function f() { g(c.a) }
function g(e) {
    $.d({ url: c.url, data: { _type: "GetLastToEnd", LastID: e }, async: c.async, dataType: c.dataType, type: c.type, g: function(a) {
        for (var b = 0; b < a.length; b++) {
            var d = '<div class="ShowMsg"><div><span class="ShowSpanName">' + a[b].msgName + '</span><span class="ShowSpanIP">' + a[b].msgIP + '</span><span class="ShowSpanTime">' + a[b].msgTime + '</span></div><div class="ShowMsgText"><p id="ShowMsg_P' + a[b].msgID + '"></p></div></div>'; $("#Main_Show_Msg").append(d); $("#ShowMsg_P" + a[b].msgID).text(a[b].msgText); $.c(c.b) != $.c(a[b].msgName) &&
h(a[b].msgName); d = document.getElementById("Main_Show_Msg"); d.scrollTop = d.scrollHeight - d.clientHeight
        } if (a.length != 0) c.a = a[a.length - 1].msgID; setTimeout(f, 1E3)
    } 
    })
} function h(e) { if (e != "") { document.title = "\u7b80\u5355\u804a\u5929\u5ba4LiuJu----\u4f60\u6709[" + e + "]\u53d1\u6765\u7684\u65b0\u6d88\u606f"; setTimeout("ChangeWindowsTitle('')", 4E3) } else document.title = "\u7b80\u5355\u804a\u5929\u5ba4LiuJu" };